package me.young4979.android.library1;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;

import com.google.gson.GsonBuilder;

public class Lib1Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_lib1);
        RadarEntity entity = new RadarEntity();
        RadarEntity.Item taskItem = new RadarEntity.Item();
        taskItem.setName("做任务");
        taskItem.setValue(20.0);
        entity.setTask(taskItem);
        RadarEntity.Item selectItem = new RadarEntity.Item();
        selectItem.setName("选择能力");
        selectItem.setValue(40.0);
        entity.setSelect(selectItem);
        RadarEntity.Item judgeItem = new RadarEntity.Item();
        judgeItem.setName("判断能力");
        judgeItem.setValue(50.0);
        entity.setJudge(judgeItem);
        RadarEntity.Item learnItem = new RadarEntity.Item();
        learnItem.setName("课程学习");
        learnItem.setValue(60.0);
        entity.setLearn(learnItem);
        String json = new GsonBuilder().create().toJson(entity);
        Log.e(Lib1Activity.class.getName(), json);
    }
}
